<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- 优先使用 IE 最新版本和 Chrome-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!-- 为移动设备添加 viewport-->
    <meta name="viewport"
          content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <!-- 是否启用 WebApp 全屏模式，删除苹果默认的工具栏和菜单栏-->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- 设置苹果工具栏颜色-->
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!-- 添加智能 App 广告条 Smart App Banner（iOS 6+ Safari）-->
    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    <!-- 忽略页面中的数字识别为电话，忽略email识别-->
    <meta name="format-detection" content="telphone=no, email=no">
    <!-- 下面三个是清除缓存 微信浏览器缓存严重又无刷新；这个方法调试的时候很方便-->
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <title>购物车</title>
    <!--引入swipper.css-->
    <link rel="stylesheet" href="../lib/swiper/swiper-3.3.1.min.css">
    <!--  引入  weui.css jquery-weui.css jQuery WeUI 依赖 weui.css 和 jQuery，但是请注意要使用正确的版本。-->
    <link rel="stylesheet" href="../lib/weui/weui.css">
    <link rel="stylesheet" href="../lib/weui/jquery-weui.css">
    <!--引入ydui.css-->
    <link rel="stylesheet" href="../lib/ydui/ydui.css">
    <!--引入jquery-->
    <script src="../lib/jquery/jquery-2.1.4.min.js"></script>
    <!--引入city.js-->
    <script src="../lib/ydui/ydui.citys.js"></script>
    <!--引入Vue-->
    <script src="../lib/vue/vue.min.js"></script>
    <!--引入jquery-weui.js-->
    <script src="../lib/weui/jquery-weui.min.js"></script>
    <!--引入flexible.js-->
    <script src="../lib/flexible/flexible.js"></script>
    <!--引用handler.js-->
    <script src="../lib/template/handlebars-v4.0.5.js"></script>
    <!--引入Swiper.js-->
    <script src="../lib/swiper/swiper-3.3.1.min.js"></script>
    <!--引入公共css-->
    <link rel="stylesheet" href="../lib/css/style-min.css">
    <!--引入公共common.js-->
    <script src="../lib/common/common.js"></script>
    <!--引入对应的css-->
    <link rel="stylesheet" href="../css/shop/shop.css">
    <link rel="stylesheet" href="../css/shop/index.css">
</head>
<body>
<div class="weui_tab content">
    <!--底部导航-->
    <div class="weui_tabbar">
        <a href="javascript:void(0)" class="weui_tabbar_item" onclick="returnHome()">
            <div class="weui_tabbar_icon">
                <img src="../images/home/icon/icon_home.png" alt="">
            </div>
            <p class="weui_tabbar_label">首页</p>
        </a>
        <a href="javascript:;" class="weui_tabbar_item active">
            <div class="weui_tabbar_icon">
                <img src="../images/home/icon/icon_shop_active.png" alt="">
            </div>
            <p class="weui_tabbar_label">购物车</p>
        </a>
        <a href="../user/me.html" class="weui_tabbar_item">
            <div class="weui_tabbar_icon">
                <img src="../images/home/icon/icon_me.png" alt="">
            </div>
            <p class="weui_tabbar_label">我的</p>
        </a>
    </div>
    <div class="weui_tab_bd">
        <div class="shop-null" style="display: none;">
            <div class="shop-null-box">
                <img src="../images/shop/shop_empty.png" alt="">
                <p>您的购物车空空如也，快去逛逛吧~</p>
            </div>
            <div class="me-apps">
                <a href="/">去逛逛</a>
            </div>
            <!--热销单品-->
            <div class="weui-hr-5" style="background: #f0f0f0;"></div>
            <div class="day-recommend">
                <div class="day-rec1" style="text-align: center">
                    <img src="../images/shop/everyone_buying.png" alt="" style="width: 185px;height: 13px;margin-top:13px;display:inline-block">
                </div>
                <div class="day-content" style="background: #f0f0f2; padding-top: .1333rem;">
                    <div class="hot-list">
                        <ul class="hot-list-box clearfix" id="hot-list-box-id">
                        </ul>
                    </div>
                </div>
            </div>
            <!--/热销单品-->
        </div>
        <!--添加购物车-->
        <div class="shop-add" style="">
            <div class="shop-add-box">
                <div class="clearInvalidBtn" onclick="isClear()">
                    清除失效宝贝
                </div>
            </div>
            <div class="shop-add-foot">
            </div>
            <div class="shop-add-f clearfix">
                <div class="shop-add-fl">
                    <input class="shop-check all-shop-check" type="checkbox" name="all-shop-check" onclick="allCheckGoods()" autocomplete="off">
                    <label style="font-size:15px;color:#494949;">全选</label>
                </div>

                <div class="shop-add-fr" style="font-size:15px;">
                    <label style="color:#ff893e;font-size:15px;"><span style="color:#494949;">总价：</span>￥<span class="all-sum-price">0.00</span></label>
                    <a class="shop-add-submit" href="javascript:;" onclick="clearing()">结算</a>
                </div>
            </div>
        </div>
        <script id="entry-template" type="text/x-handlebars-template">
            <ul class="storeId-{{storeId}}  store">
                {{#each data}}
                <li class="shop-add-row shopLi shopCartId-{{shoppingCartId}}">
                    <div class="row-cell-hd">

                        {{#if invalid}}
                        <input class="shop-check" type="checkbox" name="shop-check" onclick="checkGoods({{shoppingCartId}})" data-id="{{shoppingCartId}}">
                        {{else}}
                        <span class="invalid" data-id="{{shoppingCartId}}">失效</span>
                        {{/if}}
                    </div>
                    <div class="row-cell-bd">
                        <div class="row-cell-box">
                            <div class="row-cell-con">
                                <div class="row-cell-l"><a href="../goods/goods.html?goodsId={{goodId}}"><img src="{{imagePath}}"></a></div>
                                <div class="row-cell-r">
                                    <div class="row-cell-r-box">
                                        <div class="row-cell-r-con">
                                            <h3>{{goodsName}}</h3>
                                            {{#if invalid}}
                                            <p>{{specName}}</p>
                                            {{/if}}
                                        </div>
                                        <div class="row-cell-r-del" style="display:none">
                                            <a href="javascript:;" onclick="delGoods({{shoppingCartId}})"><img src="../images/shop/shop_delete_icon.png"/></a>
                                        </div>
                                    </div>
                                    <!--添加-->
                                    {{#if invalid}}
                                    <div class="row-cell-add clearfix">
                                        <div class="row-cell-add-price">
                                            <label><i>￥</i><span class="price-{{shoppingCartId}}">{{salePrice}}</span></label>
                                            {{!--<del><i>￥</i><span>5988.00</span></del>--}}
                                        </div>
                                        <div class="row-cell-add-btn clearfix">
                                            <a  class="subtract"  href="javascript:;" onclick="decrease({{shoppingCartId}})"></a>
                                            <input type="number" disabled value="{{productNum}}" class="num num-{{shoppingCartId}}">
                                            <a class="add" href="javascript:;" onclick="increase({{shoppingCartId}})"></a>
                                        </div>
                                    </div>
                                    {{/if}}
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
                {{/each}}
            </ul>
        </script>
        <!--添加购物车-->
        <!--正在加载-->
        <div class="weui-infinite-scroll-box">
            <div class="weui-infinite-scroll">
                <div class="infinite-preloader"></div>
                正在加载...
            </div>
        </div>
        <!--正在加载-->
    </div>
</div>

<!--登录已过期-->
<div class="again-access-token">
    <img class="img" src="../images/system_error.png">
    <p>登录信息已过期，请重新登录</p>
    <div class="btn">
        <a href="javascript:;" class="weui_btn weui_btn_primary" onclick="againAccessToken()">重新登录</a>
    </div>
</div>
</body>
<script src='../lib/ydui/ydui.js'></script>
<script src="../js/shop/index.js"></script>
</html>